oracle.pg.common

## Class OracleWrapperGraph

- java.lang.Object
- - oracle.pg.common.OracleWrapperGraph

- All Implemented Interfaces:
    Graph, TransactionalGraph

      public class OracleWrapperGraph
      extends Object
      implements Graph, TransactionalGraph

  This class implements the Blueprints Graph interface by using an Oracle backend.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.tinkerpop.blueprints.TransactionalGraph

      `TransactionalGraph.Conclusion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `TYPE_DT_EMPTY`
    `static int` | `TYPE_DT_FLOAT`
    `static int` | `TYPE_DT_INTEGER`
    `static int` | `TYPE_DT_STRING`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Edge` | `addEdge(Object id, Vertex outVertex, Vertex inVertex, String label)` This method adds an edge to the graph instance.
    `Vertex` | `addVertex(Object id)` This method adds a Vertex instance to the graph
    `void` | `commit()`
    `static byte[]` | `escape(String s)`
    `Edge` | `getEdge(Object id)` Return the edge referenced by the object identifier
    `String` | `getEdgeFileName()`
    `Iterable<Edge>` | `getEdges()` Return an iterable to all the edges in the graph.
    `Iterable<Edge>` | `getEdges(String key, Object value)` Return an iterable to all the edges in the graph that have a particular key/value property.
    `Features` | `getFeatures()` Get the particular features of the graph implementation.
    `String` | `getGraphName()`
    `static OracleWrapperGraph` | `getInstance(String szGraphName, String szVertexFileName, String szEdgeFileName)` Returns an instance of OracleWrapperGraph using the Oracle connection and graph name provided.
    `Vertex` | `getVertex(Object id)` Return the vertex referenced by the object identifier.
    `String` | `getVertexFileName()`
    `Iterable<Vertex>` | `getVertices()` Return an iterable to all the vertices in the graph.
    `Iterable<Vertex>` | `getVertices(String key, Object value)` Return an iterable to all the vertices in the graph that have a particular key/value property.
    `void` | `load()` A function to load graph from flat files to Oracle DB
    `GraphQuery` | `query()`
    `void` | `removeEdge(Edge edge)` Remove the prDVIDed edge from the graph.
    `void` | `removeVertex(Vertex vertex)` Remove the prDVIDed vertex from the graph.
    `void` | `rollback()`
    `void` | `shutdown()` A shutdown function is required to properly close the graph.
    `void` | `startTransaction()` Start a transaction.
    `void` | `stopTransaction(TransactionalGraph.Conclusion conclusion)` Stop the current transaction.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TYPE_DT_EMPTY

          public static final int TYPE_DT_EMPTY

      See Also:
        Constant Field Values

    - #### TYPE_DT_FLOAT

          public static final int TYPE_DT_FLOAT

      See Also:
        Constant Field Values

    - #### TYPE_DT_INTEGER

          public static final int TYPE_DT_INTEGER

      See Also:
        Constant Field Values

    - #### TYPE_DT_STRING

          public static final int TYPE_DT_STRING

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### addEdge

          public Edge addEdge(Object id,
                     Vertex outVertex,
                     Vertex inVertex,
                     String label)

      This method adds an edge to the graph instance. Note that this is just a logical operation. Note that this is not a thread safe method.
      Specified by:
        `addEdge` in interface `Graph`

    - #### addVertex

          public Vertex addVertex(Object id)

      This method adds a Vertex instance to the graph
      Specified by:
        `addVertex` in interface `Graph`

    - #### commit

          public void commit()

      Specified by:
        `commit` in interface `TransactionalGraph`

    - #### escape

          public static byte[] escape(String s)

    - #### getEdge

          public Edge getEdge(Object id)

      Return the edge referenced by the object identifier
      Specified by:
        `getEdge` in interface `Graph`

    - #### getEdgeFileName

          public String getEdgeFileName()

    - #### getEdges

          public Iterable<Edge> getEdges()

      Return an iterable to all the edges in the graph.
      Specified by:
        `getEdges` in interface `Graph`

    - #### getEdges

          public Iterable<Edge> getEdges(String key,
                                Object value)

      Return an iterable to all the edges in the graph that have a particular key/value property.
      Specified by:
        `getEdges` in interface `Graph`

    - #### getFeatures

          public Features getFeatures()

      Get the particular features of the graph implementation.
      Specified by:
        `getFeatures` in interface `Graph`

    - #### getGraphName

          public String getGraphName()

    - #### getInstance

          public static OracleWrapperGraph getInstance(String szGraphName,
                                       String szVertexFileName,
                                       String szEdgeFileName)
                                                throws IOException

      Returns an instance of OracleWrapperGraph using the Oracle connection and graph name provided.
      Throws:
        `IOException`

    - #### getVertex

          public Vertex getVertex(Object id)

      Return the vertex referenced by the object identifier.
      Specified by:
        `getVertex` in interface `Graph`

    - #### getVertexFileName

          public String getVertexFileName()

    - #### getVertices

          public Iterable<Vertex> getVertices()

      Return an iterable to all the vertices in the graph.
      Specified by:
        `getVertices` in interface `Graph`

    - #### getVertices

          public Iterable<Vertex> getVertices(String key,
                                     Object value)

      Return an iterable to all the vertices in the graph that have a particular key/value property.
      Specified by:
        `getVertices` in interface `Graph`

    - #### load

          public void load()

      A function to load graph from flat files to Oracle DB

    - #### query

          public GraphQuery query()

      Specified by:
        `query` in interface `Graph`

    - #### removeEdge

          public void removeEdge(Edge edge)

      Remove the prDVIDed edge from the graph.
      Specified by:
        `removeEdge` in interface `Graph`

    - #### removeVertex

          public void removeVertex(Vertex vertex)

      Remove the prDVIDed vertex from the graph.
      Specified by:
        `removeVertex` in interface `Graph`

    - #### rollback

          public void rollback()

      Specified by:
        `rollback` in interface `TransactionalGraph`

    - #### shutdown

          public void shutdown()

      A shutdown function is required to properly close the graph.
      Specified by:
        `shutdown` in interface `Graph`
      Specified by:
        `shutdown` in interface `TransactionalGraph`

    - #### startTransaction

          public void startTransaction()

      Start a transaction.

    - #### stopTransaction

          public void stopTransaction(TransactionalGraph.Conclusion conclusion)

      Stop the current transaction.
      Specified by:
        `stopTransaction` in interface `TransactionalGraph`

Copyright © 2015 Oracle and/or its affiliates. All Rights Reserved.